<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            /* 写到父元素对所有子元素生效 */
            perspective: 500px;
        }
        img {
            display: block;
            margin: 0 auto;
            width: 500px; 
            border-radius: 50%;
            transition: all 1s;
        }
        /* div:hover .x {
            transform: rotateX(360deg);
        }
        div:hover .y {
            transform: rotateY(360deg);
        }
        div:hover .z{
            transform: rotateZ(360deg);
        } */
        .x:hover {
        /* transform必须写在前面 */
            transform: perspective(500px) rotateX(360deg);
        }
        .y:hover {
            transform: rotateY(360deg);
        }
        .z:hover {
            transform: rotateZ(360deg);
        } 

    </style>
    </style>
</head>
<body>
    <div>
        <img src="./img/cat.jpg" alt="" class="x">
        <img src="./img/cat.jpg" alt="" class="y">
        <img src="./img/cat.jpg" alt="" class="z">
    </div>
</body>
</html>